//
//  ZLViewController.m
//  ZLScrollViewController
//
//  Created by itzhaolei@foxmail.com on 02/15/2020.
//  Copyright (c) 2020 itzhaolei@foxmail.com. All rights reserved.
//

#import "ZLViewController.h"
#import "ZLMainScrollViewController.h"

@interface ZLViewController ()

@end

@implementation ZLViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    ///展示入口
    [self showItem];
}

- (void)showItem {
    UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(UIScreen.mainScreen.bounds.size.width / 3, UIScreen.mainScreen.bounds.size.height / 3, UIScreen.mainScreen.bounds.size.width / 3, UIScreen.mainScreen.bounds.size.width / 3)];
    button.backgroundColor = UIColor.redColor;
    button.layer.borderColor = [UIColor.orangeColor colorWithAlphaComponent:0.4].CGColor;
    button.layer.borderWidth = 5.0;
    button.layer.cornerRadius = CGRectGetHeight(button.frame) / 2;
    button.layer.masksToBounds = YES;
    [button setTitle:@"点击测试" forState:UIControlStateNormal];
    [button addTarget:self action:@selector(action) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];
}

#pragma mark - Action
- (void)action {
    ZLMainScrollViewController *mainScrollVc = [ZLMainScrollViewController new];
    mainScrollVc.modalPresentationStyle = NO;
    [UIApplication.sharedApplication.delegate.window.rootViewController presentViewController:mainScrollVc animated:YES completion:nil];
}

@end
